using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SudokuHelper.Model;
using SudokuHelper.Model.Values;
using SudokuHelper.Views;

namespace SudokuHelper.Controllers {
    public interface ISudokuController {
        /// <summary>
        /// Gets a reference to current sudoku desk
        /// </summary>
        ISudokuDesk Desk { get; }

        /// <summary>
        /// Gets or sets a reference to view controlled by controller
        /// </summary>
        ISudokuView View { get; set; }

        /// <summary>
        /// Sets a value into a desk
        /// </summary>
        /// <param name="rowIndex">Cell row index</param>
        /// <param name="colIndex">Cell column index</param>
        /// <param name="value">Value</param>
        void SetValue(int rowIndex, int colIndex, IValue value);

        /// <summary>
        /// Gets values indicating whether specified cell is free to place a user value
        /// </summary>
        /// <param name="rowIndex"></param>
        /// <param name="colIndex"></param>
        /// <returns></returns>
        bool CellIsFree(int rowIndex, int colIndex);

        /// <summary>
        /// Reset desk state to initial value
        /// </summary>
        void Reset();
    }
}